package com.personal.common.result;


import com.personal.common.errorCode.ErrorCode;

public class ResponseData {
	private String result_code;
	private String message;
	private Object data;
	
	public String getResult_code() {
		return result_code;
	}
	public void setResult_code(String result_code) {
		this.result_code = result_code;
	}
	public String getMessage() {
		return message;
	}
	public void setMessage(String message) {
		this.message = message;
	}
	public Object getData() {
		return data;
	}
	public void setData(Object data) {
		this.data = data;
	}
	
	public ResponseData(String result_code,String message) {
		this.result_code = result_code;
//		this.message = message;
	}
	
	public static ResponseData ok() {
		return new ResponseData(ErrorCode.ok, "success");
	}

	public static ResponseData noPermission() {
		return new ResponseData(ErrorCode.noPermission, "No Permission");
	}
	
	public static ResponseData sessionTimeout() {
		return new ResponseData(ErrorCode.sessionTimeout, "Logon Session TimeOut");
	}
	
	public static ResponseData userNotExist() {
		return new ResponseData(ErrorCode.userNotExists, "The User is not exists!");
	}
	
	public static ResponseData userOrPasswordWrong() {
		return new ResponseData(ErrorCode.userOrPasswordWrong, "The user or password is wrong!");
	}
	
	public static ResponseData userLock() {
		return new ResponseData(ErrorCode.userLock, "The user is lock");
	}
	
	public static ResponseData passwordOverdue() {
		return new ResponseData(ErrorCode.passwordOverdue, "The password is overdue");
	}
	
	public static ResponseData userHasNoRole() {
		return new ResponseData(ErrorCode.userHasNoRole, "the role of the user is null!");
	}
	
	public static ResponseData noBindIp() {
		return new ResponseData(ErrorCode.noBindIp, "The user can not log in from the current machine!");
	}
	
	public static ResponseData noBindTime() {
		return new ResponseData(ErrorCode.noBindTime, "The user can not log in from the current machine!");
	}

	public static ResponseData userOverdue() {
		return new ResponseData(ErrorCode.userOverdue, "The user is overdue");
	}
	
	public static ResponseData userCancel() {
		return new ResponseData(ErrorCode.userCancel, "The user is cancel");
	}
	
	public static ResponseData loginSuccess() {
		return new ResponseData(ErrorCode.loginSuccess, "Login success");
	}
	
	public static ResponseData paramError() {
		return new ResponseData(ErrorCode.paramError, "The Param is error!");
	}
	
	public static ResponseData tokenInvalid() {
		return new ResponseData(ErrorCode.tokenInvalid, "The token is invalid");
	}
	
	
}
